package spelet;

import java.awt.Graphics;
import java.awt.Toolkit;

public class Menu {

    public boolean selected;
    public int position_x, position_y;
    public Sprite s;
    public Sprite s_selected;
    public String type;

    public Menu(String lol, int x, int y) {
        position_x = x;
        position_y = y;
        type = lol;

        if (type == "play") {
            s = new Sprite(Toolkit.getDefaultToolkit().getImage("Sprites\\play.jpg"));
            s_selected = new Sprite(Toolkit.getDefaultToolkit().getImage("Sprites\\play_selected.jpg"));
        }

        if (type == "level") {
            s = new Sprite(Toolkit.getDefaultToolkit().getImage("Sprites\\levels.jpg"));
            s_selected = new Sprite(Toolkit.getDefaultToolkit().getImage("Sprites\\levels_selected.jpg"));
        }

        if (type == "editor") {
            s = new Sprite(Toolkit.getDefaultToolkit().getImage("Sprites\\editor.jpg"));
            s_selected = new Sprite(Toolkit.getDefaultToolkit().getImage("Sprites\\editor_selected.jpg"));
        }

        if (type == "quit") {
            s = new Sprite(Toolkit.getDefaultToolkit().getImage("Sprites\\quit.jpg"));
            s_selected = new Sprite(Toolkit.getDefaultToolkit().getImage("Sprites\\quit_selected.jpg"));
        }


    }

    public void draw(Graphics g) {
        if (selected == true) {
            s_selected.draw(g, position_x, position_y);
        } else {
            s.draw(g, position_x, position_y);
        }

    }
}


